import Vue from 'vue'
import Router from 'vue-router'
Vue.use(Router)
import VueWechatTitle from 'vue-wechat-title'
Vue.use(VueWechatTitle)

// 登录
import Login from '@/pages/login/login.vue'
import Details from '@/pages/details/details'
import Index from '@/pages/index.vue'
// Manage
import queryList from '@/pages/details/children/query-list'
import getDetail from '@/pages/details/children/get-detail'
import addVendor from '@/pages/details/children/add-vendor'
import updateVendor from '@/pages/details/children/update-vendor'
import editConnectPerson from '@/pages/details/children/edit-connect-person'
// 店铺管理
import storeManage from '@/components/storeManage/store_manage.vue'
import createstore from '@/components/storeManage/create_store.vue'
import storeInfo from '@/components/storeManage/store_info.vue'
import editStore from '@/components/storeManage/edit_store_info.vue'
import storeConfigure from '@/components/storeManage/store_configure.vue'
import editContract from '@/components/storeManage/edit_contract.vue'
import editSaleInfo from '@/components/storeManage/edit_sale_info.vue'
import EditStoreContact from '@/pages/store/edit_store_contact.vue'
import ChangeStoreInfo from '@/pages/store/change_store_info.vue'
// 奢侈品管理
// 奢侈品商品列表
import luxuryGoodsSearchList from '@/components/luxuryGoodManager/luxuryGoodsSearchList.vue'
import luxuryGoodsDetail from '@/components/luxuryGoodManager/luxuryGoodsDetail.vue'
// 奢侈品商品分类管理
import luxuryGoodsManagerCategory from '@/components/luxuryGoodManager/luxuryGoodsManagerCategory.vue'
// 品牌列表
import brandSearchList from '@/components/brand/brandSearchList.vue'
import brandEdit from '@/components/brand/brandEdit.vue'
import brandAdd from '@/components/brand/brandAdd.vue'
//订单管理
import luxuryOrderSearchList from '@/components/order/luxuryOrderSearchList.vue'
import offlineOrderSearchList from '@/components/order/offlineOrderSearchList.vue'
import restaurantOrderSearchList from '@/components/order/restaurantOrderSearchList.vue'
// 餐饮分类管理
import restaurantCategory from '@/components/restaurant/restaurantCategory.vue'
import restaurantGoodsSearchList from '@/components/restaurantGoodsManager/restaurantGoodsSearchList.vue'
// 会员
import customerSearchList from '@/components/customer/customerSearchList.vue'
// 属性管理
import productAttributeSearchList from  '@/components/productAttribute/productAttributeSearchList.vue'

export default new Router({
  routes: [
    {
      path: '/login',
      component: Login
    },
    {
      path: '/',
      component: Details,
      redirect: '/index',
      children: [
        {
          path: 'index',
          component: Index
        },
        {
          path: 'query-list',
          component: queryList
        },
        {
          path: 'get-detail/:id',
          component: getDetail
        },
        {
          path: 'add-vendor',
          component: addVendor
        },
        {
          path: 'update-vendor/:id',
          component: updateVendor
        },
        {
          path: 'edit-connect-person/:id',
          component: editConnectPerson
        },
        {
          path: '/changeStoreInfo/:id',
          component: ChangeStoreInfo
        },
        {
          path: '/editStoreContact/:id',
          component: EditStoreContact
        },
        {
          path: '/storeManage',
          component: storeManage
        },
        {
          path: '/storeManage/:id',
          component: storeManage
        },
        {
          path: '/createstore',
          component: createstore
        },
        {
          path: '/storeInfo/:id',
          component: storeInfo
        },
        {
          path: '/editStore/:id',
          component: editStore
        },
        {
          path: '/storeConfigure/:id',
          component: storeConfigure
        },
        {
          path: '/editContract/:id',
          component: editContract
        },
        {
          path: '/editSaleInfo/:id',
          component: editSaleInfo
        },
        {
          path: '/luxuryGoodsManagerCategory',
          component: luxuryGoodsManagerCategory
        },
        {
          path: '/luxuryGoodsSearchList',
          component: luxuryGoodsSearchList
        },
        {
          path: '/restaurantCategory',
          component: restaurantCategory
        },
        {
          path: '/brandSearchList',
          component: brandSearchList
        },
        {
          path: 'luxuryOrderSearchList',
          component: luxuryOrderSearchList
        },
        {
          path: 'offlineOrderSearchList',
          component: offlineOrderSearchList
        },
        {
          path: 'customerSearchList',
          component: customerSearchList
        },
        {
          path: 'productAttributeSearchList',
          component: productAttributeSearchList
        },
        {
          path: 'brandEdit',
          name: 'brandEdit',
          component: brandEdit
        },
        {
          path:'brandAdd',
          name: 'brandAdd',
          component: brandAdd
        },
        {
          path: 'restaurantGoodsSearchList',
          name: 'restaurantGoodsSearchList',
          component: restaurantGoodsSearchList
        },
        {
          path: 'restaurantOrderSearchList',
          name: 'restaurantOrderSearchList',
          component: restaurantOrderSearchList
        },
        {
          path: 'luxuryGoodsDetail/:id',
          name: 'luxuryGoodsDetail',
          component: luxuryGoodsDetail
        }
      ]
    }
  ]
})
